package com.abc.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

@Data
@Component
@RefreshScope
@ConfigurationProperties(prefix = "zhipu")
public class ZhipuConfig {

    /**
     * 智谱AI API密钥
     */
    private String apiKey;

    /**
     * 文件解析服务基础URL
     */
    private String fileParserBaseUrl;

    /**
     * 创建解析任务URL
     */
    public String getCreateTaskUrl() {
        return fileParserBaseUrl + "/create";
    }

    /**
     * 获取解析结果URL
     */
    public String getResultUrl() {
        return fileParserBaseUrl + "/result";
    }

    /**
     * Tokenizer API URL
     */
    private String tokenizerUrl;


}
